package com.xing.cglib.mytest;

import com.xing.cglib.HelloService;
import com.xing.cglib.mytest.weave.WeavUtil;
import org.objectweb.asm.tree.ClassNode;
import org.objectweb.asm.tree.MethodNode;

import java.util.List;

public class MyTestMain {

    public static void main(String[] args) throws Exception{
        ClassNode helloServiceClassNode = WeavUtil.convertToClassNode(WeavUtil.getClassByteArray(HelloService.class.getName()));
        List list = helloServiceClassNode.methods;
        System.err.println(list);

        ClassNode hellServiceInterceptorClassNode = WeavUtil.convertToClassNode(WeavUtil.getClassByteArray(HelloService_intercept.class.getName()));
        List list2 = hellServiceInterceptorClassNode.methods;
        System.err.println(list2);

        MethodNode source = WeavUtil.getMethodNode(helloServiceClassNode, "doRun", "()V");
        MethodNode target = WeavUtil.getMethodNode(hellServiceInterceptorClassNode, "doRun", "()V");
    }
}
